import { createContext, useContext } from 'react';

interface LoadingContextType {
  isLoading: boolean;
  setLoading: (isShow: boolean) => void;
}

export const LoadingContext = createContext<LoadingContextType>({
  isLoading: false,
  setLoading: () => { },
});

export const useLoading = () => useContext(LoadingContext);